
clear all 

//define folder global here

gl Inputs "$folder\1_Inputs"
gl Intermediate "$folder\2_Intermediate"
gl Outputs "$folder\3_Outputs"

********************************************************************************

use "${Intermediate}\Combined for forloops.dta", clear

gen keeping = 1 if inlist(outcome, "move", "eshu", "home", "earn", "empl")
replace keeping = 1 if inlist(outcome, "inde", "cred", "zero", "deli", "auto", "hosp", "emer", "ment")
replace keeping = . if !inlist(time, "q0104", "q0508") 
keep if keeping==1 
drop keeping
keep if inlist(spec, "ivac", "did")

********************************************************************************
levelsof outcome, local(outcomes)
levelsof group, local(groups)
levelsof spec, local(specs)
levelsof time, local(times)
levelsof geo, local(geos)
levelsof item, local(items)

foreach outx in `outcomes' {
	local id1 = "`outx'"
	
	foreach grox in `groups' {
		local id2 = "`grox'"
		
		foreach spex in `specs' {
			local id3 = "`spex'"
			
			foreach timx in `times' {
				local id4 = "`timx'"
				
				foreach geox in `geos' {
					local id5 = "`geox'"
					
					foreach itex in `items' {
						local id6 = "`itex'"
		
					levelsof value if 	outcome=="`outx'" & ///
										group=="`grox'" & ///
										spec=="`spex'" & ///
										time=="`timx'" & ///
										geo=="`geox'" & ///
										item=="`itex'" , ///
						clean local(`id1'_`id2'_`id3'_`id4'_`id5'_`id6')
						di "`id1'_`id2'_`id3'_`id4'_`id5'_`id6'"
						
					}
				}
			}
		}
	}
}

********************************************************************************
********************************************************************************
**# Table J1


texdoc init "${Outputs}/Supplementary data_Table_J1.tex", replace force 
tex {\footnotesize \begin{tabular}{l c c c c c c c} \hline \toprule ///
	& \multicolumn{3}{c}{\textbf{1 Year After Filing}} ///
	& & \multicolumn{3}{c}{\textbf{2 Years After Filing}} \\
	
tex \cmidrule{2-4} \cmidrule{6-8}
	
tex	& {\scriptsize $ \mathbb{E}[Y \vert E=0]$} & IV & DiD ///
	& & {\scriptsize $ \mathbb{E}[Y \vert E=0]$} & IV & DiD \\

tex & (1) & (2) & (3) & & (4) & (5) & (6) \\
tex \cline{2-4} \cline{6-8}			
 
tex 						& & & & & & & \\
tex $x \textbf{Not at eviction address:} 	& `move_a_ivac_q0104_b_m' 		& `move_a_ivac_q0104_b_co' 			& `move_a_did_q0104_b_co' ///
							& & `move_a_ivac_q0508_b_m' 	& `move_a_ivac_q0508_b_co' 			& `move_a_did_q0508_b_co' \\ 
tex 						& `move_a_ivac_q0104_b_mse' 	& `move_a_ivac_q0104_b_se' 			& `move_a_did_q0104_b_se' ///
							& & `move_a_ivac_q0508_b_mse' 	& `move_a_ivac_q0508_b_se' 			& `move_a_did_q0508_b_se' \\ 
tex $x 				 		& & \multicolumn{1}{r}{[`move_a_ivac_q0104_b_obs']} & \multicolumn{1}{r}{[`move_a_did_q0104_b_obs']} & ///
							& & \multicolumn{1}{r}{[`move_a_ivac_q0508_b_obs']} & \multicolumn{1}{r}{[`move_a_did_q0508_b_obs']} \\	
							
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `move_a_ivac_q0104_c_m' 		& `move_a_ivac_q0104_c_co' 			& `move_a_did_q0104_c_co' ///
							& & `move_a_ivac_q0508_c_m' 	& `move_a_ivac_q0508_c_co' 			& `move_a_did_q0508_c_co' \\ 
tex 						& `move_a_ivac_q0104_c_mse' 	& `move_a_ivac_q0104_c_se' 			& `move_a_did_q0104_c_se' ///
							& & `move_a_ivac_q0508_c_mse' 	& `move_a_ivac_q0508_c_se' 			& `move_a_did_q0508_c_se' \\ 				
tex $x ~~~New York 			& `move_a_ivac_q0104_n_m' 		& `move_a_ivac_q0104_n_co' 			& `move_a_did_q0104_n_co' ///
							& & `move_a_ivac_q0508_n_m' 	& `move_a_ivac_q0508_n_co' 			& `move_a_did_q0508_n_co' \\ 
tex 						& `move_a_ivac_q0104_n_mse' 	& `move_a_ivac_q0104_n_se' 			& `move_a_did_q0104_n_se' ///
							& & `move_a_ivac_q0508_n_mse' 	& `move_a_ivac_q0508_n_se' 			& `move_a_did_q0508_n_se' \\ 
tex $x \textit{By Group} 	& & & & & & & \\				
tex $x ~~~Female 			& `move_f_ivac_q0104_b_m' 		& `move_f_ivac_q0104_b_co' 			& `move_f_did_q0104_b_co' ///
							& & `move_f_ivac_q0508_b_m' 	& `move_f_ivac_q0508_b_co' 			& `move_f_did_q0508_b_co' \\ 
tex 						& `move_f_ivac_q0104_b_mse' 	& `move_f_ivac_q0104_b_se' 			& `move_f_did_q0104_b_se' ///
							& & `move_f_ivac_q0508_b_mse' 	& `move_f_ivac_q0508_b_se' 			& `move_f_did_q0508_b_se' \\ 			
tex $x ~~~Black 			& `move_b_ivac_q0104_b_m' 		& `move_b_ivac_q0104_b_co' 			& `move_b_did_q0104_b_co' ///
							& & `move_b_ivac_q0508_b_m' 	& `move_b_ivac_q0508_b_co' 			& `move_b_did_q0508_b_co' \\ 
tex 						& `move_b_ivac_q0104_b_mse' 	& `move_b_ivac_q0104_b_se' 			& `move_b_did_q0104_b_se' ///
							& & `move_b_ivac_q0508_b_mse' 	& `move_b_ivac_q0508_b_se' 			& `move_b_did_q0508_b_se' \\
tex \midrule				

tex & & & & & & & \\
tex $x \textbf{Emergency shelter:} 	& `eshu_a_ivac_q0104_b_m' 		& `eshu_a_ivac_q0104_b_co' 			& `eshu_a_did_q0104_b_co' ///
							& & & & \\ 
tex 						& `eshu_a_ivac_q0104_b_mse' 	& `eshu_a_ivac_q0104_b_se' 			& `eshu_a_did_q0104_b_se' ///
							& & & & \\ 
tex $x 				 		& & \multicolumn{1}{r}{[`eshu_a_ivac_q0104_b_obs']} & \multicolumn{1}{r}{[`eshu_a_did_q0104_b_obs']} & ///
							& & & \\	
							
							
tex $x \textit{By Location} 	& & & & & & & \\					
tex $x ~~~Cook County 		& `eshu_a_ivac_q0104_c_m' 		& `eshu_a_ivac_q0104_c_co' 			& `eshu_a_did_q0104_c_co' ///
							& & & & \\ 
tex 						& `eshu_a_ivac_q0104_c_mse' 	& `eshu_a_ivac_q0104_c_se' 			& `eshu_a_did_q0104_c_se' ///
							& & & & \\ 				
tex $x ~~~New York 			& `eshu_a_ivac_q0104_n_m' 		& `eshu_a_ivac_q0104_n_co' 			& `eshu_a_did_q0104_n_co' ///
							& & & & \\ 
tex 						& `eshu_a_ivac_q0104_n_mse' 	& `eshu_a_ivac_q0104_n_se' 			& `eshu_a_did_q0104_n_se' ///
							& & & & \\ 
tex $x \textit{By Group}	& & & & & & & \\					
tex $x ~~~Female 			& `eshu_f_ivac_q0104_b_m' 		& `eshu_f_ivac_q0104_b_co' 			& `eshu_f_did_q0104_b_co' ///
							& & & & \\ 
tex 						& `eshu_f_ivac_q0104_b_mse' 	& `eshu_f_ivac_q0104_b_se' 			& `eshu_f_did_q0104_b_se' ///
							& & & & \\ 			
				
tex $x ~~~Black  			& `eshu_b_ivac_q0104_b_m' 		& `eshu_b_ivac_q0104_b_co' 			& `eshu_b_did_q0104_b_co' ///
							& & & & \\ 
tex 						& `eshu_b_ivac_q0104_b_mse' 	& `eshu_b_ivac_q0104_b_se' 			& `eshu_b_did_q0104_b_se' ///
							& & & & \\
tex \midrule				

tex & & & & & & & \\
tex $x \textbf{Any homelessness services:} 	& `home_a_ivac_q0104_b_m' 		& `home_a_ivac_q0104_b_co' 			& `home_a_did_q0104_b_co' ///
							& & & & \\ 
tex 						& `home_a_ivac_q0104_b_mse' 	& `home_a_ivac_q0104_b_se' 			& `home_a_did_q0104_b_se' ///
							& & & & \\ 
tex $x 				 		& & \multicolumn{1}{r}{[`home_a_ivac_q0104_b_obs']} & \multicolumn{1}{r}{[`home_a_did_q0104_b_obs']} & ///
							& & & \\	
							
							
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `home_a_ivac_q0104_c_m' 		& `home_a_ivac_q0104_c_co' 			& `home_a_did_q0104_c_co' ///
							& & & & \\ 
tex 						& `home_a_ivac_q0104_c_mse' 	& `home_a_ivac_q0104_c_se' 			& `home_a_did_q0104_c_se' ///
							& & & & \\ 				
tex $x ~~~New York 			& `home_a_ivac_q0104_n_m' 		& `home_a_ivac_q0104_n_co' 			& `home_a_did_q0104_n_co' ///
							& & & & \\ 
tex 						& `home_a_ivac_q0104_n_mse' 	& `home_a_ivac_q0104_n_se' 			& `home_a_did_q0104_n_se' ///
							& & & & \\ 
tex $x \textit{By Group}	& & & & & & & \\					
tex $x ~~~Female 			& `home_f_ivac_q0104_b_m' 		& `home_f_ivac_q0104_b_co' 			& `home_f_did_q0104_b_co' ///
							& & & & \\ 
tex 						& `home_f_ivac_q0104_b_mse' 	& `home_f_ivac_q0104_b_se' 			& `home_f_did_q0104_b_se' ///
							& & & & \\ 			
				
tex $x ~~~Black  			& `home_b_ivac_q0104_b_m' 		& `home_b_ivac_q0104_b_co' 			& `home_b_did_q0104_b_co' ///
							& & & & \\ 
tex 						& `home_b_ivac_q0104_b_mse' 	& `home_b_ivac_q0104_b_se' 			& `home_b_did_q0104_b_se' ///
							& & & & \\

tex \bottomrule \\
tex	\end{tabular} }
texdoc close



********************************************************************************
********************************************************************************
**# Table J2

texdoc init "${Outputs}/Supplementary data_Table_J2.tex", replace force 
tex {\footnotesize \begin{tabular}{l c c c c c c c} \hline \toprule ///
	& \multicolumn{3}{c}{\textbf{1-4 Quarters After Filing}} ///
	& & \multicolumn{3}{c}{\textbf{5-8 Quarters After Filing}} \\
	
tex \cmidrule{2-4} \cmidrule{6-8}
	
tex	& {\scriptsize $ \mathbb{E}[Y \vert E=0]$} & IV & DiD ///
	& & {\scriptsize $ \mathbb{E}[Y \vert E=0]$} & IV & DiD \\

tex & (1) & (2) & (3) & & (4) & (5) & (6) \\
tex \cline{2-4} \cline{6-8}

tex & & & & & & & \\
tex $x \textbf{Earnings:} 	& `earn_a_ivac_q0104_b_m' 		& `earn_a_ivac_q0104_b_co' 		& `earn_a_did_q0104_b_co' ///
							& & `earn_a_ivac_q0508_b_m' 		& `earn_a_ivac_q0508_b_co' 		& `earn_a_did_q0508_b_co' \\ 
tex 						& `earn_a_ivac_q0104_b_mse' 		& `earn_a_ivac_q0104_b_se' 		& `earn_a_did_q0104_b_se' ///
							& & `earn_a_ivac_q0508_b_mse' 	& `earn_a_ivac_q0508_b_se' 		& `earn_a_did_q0508_b_se' \\			
tex $x 				 		& & \multicolumn{1}{r}{[`earn_a_ivac_q0104_b_obs']} & \multicolumn{1}{r}{[`earn_a_did_q0104_b_obs']} & ///
							& & \multicolumn{1}{r}{[`earn_a_ivac_q0508_b_obs']} & \multicolumn{1}{r}{[`earn_a_did_q0508_b_obs']} \\					
							
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `earn_a_ivac_q0104_c_m' 		& `earn_a_ivac_q0104_c_co' 		& `earn_a_did_q0104_c_co' ///
							& & `earn_a_ivac_q0508_c_m' 		& `earn_a_ivac_q0508_c_co' 		& `earn_a_did_q0508_c_co' \\ 
tex 						& `earn_a_ivac_q0104_c_mse' 		& `earn_a_ivac_q0104_c_se' 		& `earn_a_did_q0104_c_se' ///
							& & `earn_a_ivac_q0508_c_mse' 	& `earn_a_ivac_q0508_c_se' 		& `earn_a_did_q0508_c_se' \\ 				
tex $x ~~~New York 			& `earn_a_ivac_q0104_n_m' 		& `earn_a_ivac_q0104_n_co' 		& `earn_a_did_q0104_n_co' ///
							& & `earn_a_ivac_q0508_n_m' 		& `earn_a_ivac_q0508_n_co' 		& `earn_a_did_q0508_n_co' \\ 
tex 						& `earn_a_ivac_q0104_n_mse' 		& `earn_a_ivac_q0104_n_se' 		& `earn_a_did_q0104_n_se' ///
							& & `earn_a_ivac_q0508_n_mse' 	& `earn_a_ivac_q0508_n_se' 		& `earn_a_did_q0508_n_se' \\ 
tex $x \textit{By Group} 	& & & & & & & \\								
tex $x ~~~Female 			& `earn_f_ivac_q0104_b_m' 		& `earn_f_ivac_q0104_b_co' 		& `earn_f_did_q0104_b_co' ///
							& & `earn_f_ivac_q0508_b_m' 		& `earn_f_ivac_q0508_b_co' 		& `earn_f_did_q0508_b_co' \\ 
tex 						& `earn_f_ivac_q0104_b_mse' 		& `earn_f_ivac_q0104_b_se' 		& `earn_f_did_q0104_b_se' ///
							& & `earn_f_ivac_q0508_b_mse' 	& `earn_f_ivac_q0508_b_se' 		& `earn_f_did_q0508_b_se' \\ 			
tex $x ~~~Black  			& `earn_b_ivac_q0104_b_m' 		& `earn_b_ivac_q0104_b_co' 		& `earn_b_did_q0104_b_co' ///
							& & `earn_b_ivac_q0508_b_m' 		& `earn_b_ivac_q0508_b_co' 		& `earn_b_did_q0508_b_co' \\ 
tex 						& `earn_b_ivac_q0104_b_mse' 		& `earn_b_ivac_q0104_b_se' 		& `earn_b_did_q0104_b_se' ///
							& & `earn_b_ivac_q0508_b_mse' 	& `earn_b_ivac_q0508_b_se' 		& `earn_b_did_q0508_b_se' \\ 	

tex \midrule 
tex & & & & & & & \\
tex $x \textbf{Employment:} 	& `empl_a_ivac_q0104_b_m' 		& `empl_a_ivac_q0104_b_co'		& `empl_a_did_q0104_b_co' ///
							& & `empl_a_ivac_q0508_b_m' 		& `empl_a_ivac_q0508_b_co' 		& `empl_a_did_q0508_b_co' \\ 
tex 						& `empl_a_ivac_q0104_b_mse' 		& `empl_a_ivac_q0104_b_se' 		& `empl_a_did_q0104_b_se' ///
							& & `empl_a_ivac_q0508_b_mse' 	& `empl_a_ivac_q0508_b_se' 		& `empl_a_did_q0508_b_se' \\ 
tex $x 				 		& & \multicolumn{1}{r}{[`empl_a_ivac_q0104_b_obs']} & \multicolumn{1}{r}{[`empl_a_did_q0104_b_obs']} & ///
							& & \multicolumn{1}{r}{[`empl_a_ivac_q0508_b_obs']} & \multicolumn{1}{r}{[`empl_a_did_q0508_b_obs']} \\	
							
tex $x \textit{By Location} 	& & & & & & & \\								
tex $x ~~~Cook County 		& `empl_a_ivac_q0104_c_m' 		& `empl_a_ivac_q0104_c_co' 		& `empl_a_did_q0104_c_co' ///
							& & `empl_a_ivac_q0508_c_m' 		& `empl_a_ivac_q0508_c_co' 		& `empl_a_did_q0508_c_co' \\ 
tex 						& `empl_a_ivac_q0104_c_mse' 		& `empl_a_ivac_q0104_c_se' 		& `empl_a_did_q0104_c_se' ///
							& & `empl_a_ivac_q0508_c_mse' 	& `empl_a_ivac_q0508_c_se' 		& `empl_a_did_q0508_c_se' \\ 				
tex $x ~~~New York 			& `empl_a_ivac_q0104_n_m' 		& `empl_a_ivac_q0104_n_co' 		& `empl_a_did_q0104_n_co' ///
							& & `empl_a_ivac_q0508_n_m' 		& `empl_a_ivac_q0508_n_co' 		& `empl_a_did_q0508_n_co' \\ 
tex 						& `empl_a_ivac_q0104_n_mse' 		& `empl_a_ivac_q0104_n_se' 		& `empl_a_did_q0104_n_se' ///
							& & `empl_a_ivac_q0508_n_mse' 	& `empl_a_ivac_q0508_n_se' 		& `empl_a_did_q0508_n_se' \\ 
tex $x \textit{By Group} 	& & & & & & & \\				
tex $x ~~~Female 			& `empl_f_ivac_q0104_b_m' 		& `empl_f_ivac_q0104_b_co' 		& `empl_f_did_q0104_b_co' ///
							& & `empl_f_ivac_q0508_b_m' 		& `empl_f_ivac_q0508_b_co' 		& `empl_f_did_q0508_b_co' \\ 
tex 						& `empl_f_ivac_q0104_b_mse' 		& `empl_f_ivac_q0104_b_se' 		& `empl_f_did_q0104_b_se' ///
							& & `empl_f_ivac_q0508_b_mse' 	& `empl_f_ivac_q0508_b_se' 		& `empl_f_did_q0508_b_se' \\ 			
tex $x ~~~Black  			& `empl_b_ivac_q0104_b_m' 		& `empl_b_ivac_q0104_b_co' 		& `empl_b_did_q0104_b_co' ///
							& & `empl_b_ivac_q0508_b_m' 		& `empl_b_ivac_q0508_b_co' 		& `empl_b_did_q0508_b_co' \\ 
tex 						& `empl_b_ivac_q0104_b_mse' 		& `empl_b_ivac_q0104_b_se' 		& `empl_b_did_q0104_b_se' ///
							& & `empl_b_ivac_q0508_b_mse' 	& `empl_b_ivac_q0508_b_se' 		& `empl_b_did_q0508_b_se' \\


tex \bottomrule \\
tex	\end{tabular} }
texdoc close



********************************************************************************
********************************************************************************
**# Table J3

texdoc init "${Outputs}/Supplementary data_Table_J3.tex", replace force 
tex {\footnotesize \begin{tabular}{l c c c c c c c} \hline \toprule ///
	& \multicolumn{3}{c}{\textbf{1-4 Quarters After Filing}} ///
	& & \multicolumn{3}{c}{\textbf{5-8 Quarters After Filing}} \\
	
tex \cmidrule{2-4} \cmidrule{6-8}
	
tex	& {\scriptsize $ \mathbb{E}[Y \vert E=0]$} & IV & DiD ///
	& & {\scriptsize $ \mathbb{E}[Y \vert E=0]$} & IV & DiD \\

tex & (1) & (2) & (3) & & (4) & (5) & (6) \\
tex \cline{2-4} \cline{6-8}

tex 						& & & & & & & \\
tex $x \textbf{Financial health index:} 	& `inde_a_ivac_q0104_b_m' 			& `inde_a_ivac_q0104_b_co' 		& `inde_a_did_q0104_b_co' ///
							& & `inde_a_ivac_q0508_b_m' 		& `inde_a_ivac_q0508_b_co' 		& `inde_a_did_q0508_b_co' \\ 
tex 						& `inde_a_ivac_q0104_b_mse' 		& `inde_a_ivac_q0104_b_se' 		& `inde_a_did_q0104_b_se' ///
							& & `inde_a_ivac_q0508_b_mse' 		& `inde_a_ivac_q0508_b_se' 		& `inde_a_did_q0508_b_se' \\
tex $x 				 		& & \multicolumn{1}{r}{[`inde_a_ivac_q0104_b_obs']} & \multicolumn{1}{r}{[`inde_a_did_q0104_b_obs']} & ///
							& & \multicolumn{1}{r}{[`inde_a_ivac_q0508_b_obs']} & \multicolumn{1}{r}{[`inde_a_did_q0508_b_obs']} \\	

tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `inde_a_ivac_q0104_c_m' 			& `inde_a_ivac_q0104_c_co' 		& `inde_a_did_q0104_c_co' ///
							& & `inde_a_ivac_q0508_c_m' 		& `inde_a_ivac_q0508_c_co'		& `inde_a_did_q0508_c_co' \\ 
tex 						& `inde_a_ivac_q0104_c_mse' 		& `inde_a_ivac_q0104_c_se' 		& `inde_a_did_q0104_c_se' ///
							& & `inde_a_ivac_q0508_c_mse' 		& `inde_a_ivac_q0508_c_se' 		& `inde_a_did_q0508_c_se' \\ 
tex $x ~~~New York 			& `inde_a_ivac_q0104_n_m'	 		& `inde_a_ivac_q0104_n_co' 		& `inde_a_did_q0104_n_co' ///
							& & `inde_a_ivac_q0508_n_m' 		& `inde_a_ivac_q0508_n_co' 		& `inde_a_did_q0508_n_co' \\ 
tex 						& `inde_a_ivac_q0104_n_mse' 		& `inde_a_ivac_q0104_n_se' 		& `inde_a_did_q0104_n_se' ///
							& & `inde_a_ivac_q0508_n_mse'		& `inde_a_ivac_q0508_n_se' 		& `inde_a_did_q0508_n_se' \\ 		
tex \midrule				
tex & & & & & & & \\
tex $x \textbf{Credit score:} 	& `cred_a_ivac_q0104_b_m' 			& `cred_a_ivac_q0104_b_co' 		& `cred_a_did_q0104_b_co' ///
							& & `cred_a_ivac_q0508_b_m' 		& `cred_a_ivac_q0508_b_co' 		& `cred_a_did_q0508_b_co' \\ 
tex 						& `cred_a_ivac_q0104_b_mse' 		& `cred_a_ivac_q0104_b_se' 		& `cred_a_did_q0104_b_se' ///
							& & `cred_a_ivac_q0508_b_mse' 		& `cred_a_ivac_q0508_b_se' 		& `cred_a_did_q0508_b_se' \\
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `cred_a_ivac_q0104_c_m' 			& `cred_a_ivac_q0104_c_co' 		& `cred_a_did_q0104_c_co' ///
							& & `cred_a_ivac_q0508_c_m' 		& `cred_a_ivac_q0508_c_co'		& `cred_a_did_q0508_c_co' \\ 
tex 						& `cred_a_ivac_q0104_c_mse' 		& `cred_a_ivac_q0104_c_se' 		& `cred_a_did_q0104_c_se' ///
							& & `cred_a_ivac_q0508_c_mse' 		& `cred_a_ivac_q0508_c_se' 		& `cred_a_did_q0508_c_se' \\ 
tex $x ~~~New York 			& `cred_a_ivac_q0104_n_m'	 		& `cred_a_ivac_q0104_n_co' 		& `cred_a_did_q0104_n_co' ///
							& & `cred_a_ivac_q0508_n_m' 		& `cred_a_ivac_q0508_n_co' 		& `cred_a_did_q0508_n_co' \\ 
tex 						& `cred_a_ivac_q0104_n_mse' 		& `cred_a_ivac_q0104_n_se' 		& `cred_a_did_q0104_n_se' ///
							& & `cred_a_ivac_q0508_n_mse'		& `cred_a_ivac_q0508_n_se' 		& `cred_a_did_q0508_n_se' \\ 	
tex \midrule 
tex & & & & & & & \\
tex $x \textbf{No open revolving account:} 	& `zero_a_ivac_q0104_b_m' 			& `zero_a_ivac_q0104_b_co' 		& `zero_a_did_q0104_b_co' ///
							& & `zero_a_ivac_q0508_b_m' 		& `zero_a_ivac_q0508_b_co' 		& `zero_a_did_q0508_b_co' \\ 
tex 						& `zero_a_ivac_q0104_b_mse' 		& `zero_a_ivac_q0104_b_se' 		& `zero_a_did_q0104_b_se' ///
							& & `zero_a_ivac_q0508_b_mse' 		& `zero_a_ivac_q0508_b_se' 		& `zero_a_did_q0508_b_se' \\
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `zero_a_ivac_q0104_c_m' 			& `zero_a_ivac_q0104_c_co' 		& `zero_a_did_q0104_c_co' ///
							& & `zero_a_ivac_q0508_c_m' 		& `zero_a_ivac_q0508_c_co'		& `zero_a_did_q0508_c_co' \\ 
tex 						& `zero_a_ivac_q0104_c_mse' 		& `zero_a_ivac_q0104_c_se' 		& `zero_a_did_q0104_c_se' ///
							& & `zero_a_ivac_q0508_c_mse' 		& `zero_a_ivac_q0508_c_se' 		& `zero_a_did_q0508_c_se' \\ 
tex $x ~~~New York 			& `zero_a_ivac_q0104_n_m'	 		& `zero_a_ivac_q0104_n_co' 		& `zero_a_did_q0104_n_co' ///
							& & `zero_a_ivac_q0508_n_m' 		& `zero_a_ivac_q0508_n_co' 		& `zero_a_did_q0508_n_co' \\ 
tex 						& `zero_a_ivac_q0104_n_mse' 		& `zero_a_ivac_q0104_n_se' 		& `zero_a_did_q0104_n_se' ///
							& & `zero_a_ivac_q0508_n_mse'		& `zero_a_ivac_q0508_n_se' 		& `zero_a_did_q0508_n_se' \\ 		
	
tex \midrule 
tex & & & & & & & \\
tex $x \textbf{Total balance: collections and delinquencies:} 	& `deli_a_ivac_q0104_b_m' 			& `deli_a_ivac_q0104_b_co' 		& `deli_a_did_q0104_b_co' ///
							& & `deli_a_ivac_q0508_b_m' 		& `deli_a_ivac_q0508_b_co' 		& `deli_a_did_q0508_b_co' \\ 
tex 						& `deli_a_ivac_q0104_b_mse' 		& `deli_a_ivac_q0104_b_se' 		& `deli_a_did_q0104_b_se' ///
							& & `deli_a_ivac_q0508_b_mse' 		& `deli_a_ivac_q0508_b_se' 		& `deli_a_did_q0508_b_se' \\
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `deli_a_ivac_q0104_c_m' 			& `deli_a_ivac_q0104_c_co' 		& `deli_a_did_q0104_c_co' ///
							& & `deli_a_ivac_q0508_c_m' 		& `deli_a_ivac_q0508_c_co'		& `deli_a_did_q0508_c_co' \\ 
tex 						& `deli_a_ivac_q0104_c_mse' 		& `deli_a_ivac_q0104_c_se' 		& `deli_a_did_q0104_c_se' ///
							& & `deli_a_ivac_q0508_c_mse' 		& `deli_a_ivac_q0508_c_se' 		& `deli_a_did_q0508_c_se' \\ 
tex $x ~~~New York 			& `deli_a_ivac_q0104_n_m'	 		& `deli_a_ivac_q0104_n_co' 		& `deli_a_did_q0104_n_co' ///
							& & `deli_a_ivac_q0508_n_m' 		& `deli_a_ivac_q0508_n_co' 		& `deli_a_did_q0508_n_co' \\ 
tex 						& `deli_a_ivac_q0104_n_mse' 		& `deli_a_ivac_q0104_n_se' 		& `deli_a_did_q0104_n_se' ///
							& & `deli_a_ivac_q0508_n_mse'		& `deli_a_ivac_q0508_n_se' 		& `deli_a_did_q0508_n_se' \\ 	
tex \midrule				

tex & & & & & & & \\
tex $x \textbf{Any auto loan or lease:} 	& `auto_a_ivac_q0104_b_m' 			& `auto_a_ivac_q0104_b_co' 		& `auto_a_did_q0104_b_co' ///
							& & `auto_a_ivac_q0508_b_m' 		& `auto_a_ivac_q0508_b_co' 		& `auto_a_did_q0508_b_co' \\ 
tex 						& `auto_a_ivac_q0104_b_mse' 		& `auto_a_ivac_q0104_b_se' 		& `auto_a_did_q0104_b_se' ///
							& & `auto_a_ivac_q0508_b_mse' 		& `auto_a_ivac_q0508_b_se' 		& `auto_a_did_q0508_b_se' \\
tex $x \textit{By Location} 	& & & & & & & \\				
tex $x ~~~Cook County 		& `auto_a_ivac_q0104_c_m' 			& `auto_a_ivac_q0104_c_co' 		& `auto_a_did_q0104_c_co' ///
							& & `auto_a_ivac_q0508_c_m' 		& `auto_a_ivac_q0508_c_co'		& `auto_a_did_q0508_c_co' \\ 
tex 						& `auto_a_ivac_q0104_c_mse' 		& `auto_a_ivac_q0104_c_se' 		& `auto_a_did_q0104_c_se' ///
							& & `auto_a_ivac_q0508_c_mse' 		& `auto_a_ivac_q0508_c_se' 		& `auto_a_did_q0508_c_se' \\ 
tex $x ~~~New York 			& `auto_a_ivac_q0104_n_m'	 		& `auto_a_ivac_q0104_n_co' 		& `auto_a_did_q0104_n_co' ///
							& & `auto_a_ivac_q0508_n_m' 		& `auto_a_ivac_q0508_n_co' 		& `auto_a_did_q0508_n_co' \\ 
tex 						& `auto_a_ivac_q0104_n_mse' 		& `auto_a_ivac_q0104_n_se' 		& `auto_a_did_q0104_n_se' ///
							& & `auto_a_ivac_q0508_n_mse'		& `auto_a_ivac_q0508_n_se' 		& `auto_a_did_q0508_n_se' \\ 	


tex \bottomrule \\
tex	\end{tabular} }
texdoc close



********************************************************************************
********************************************************************************
**# Table J4

texdoc init "${Outputs}/Supplementary data_Table_J4.tex", replace force 
tex {\footnotesize \begin{tabular}{l c c c c c c c} \hline \toprule ///
	& \multicolumn{3}{c}{\textbf{1-4 Quarters After Filing}} ///
	& & \multicolumn{3}{c}{\textbf{5-8 Quarters After Filing}} \\
	
tex \cmidrule{2-4} \cmidrule{6-8}
	
tex	& {\scriptsize $ \mathbb{E}[Y \vert E=0]$} & IV & DiD ///
	& & {\scriptsize $ \mathbb{E}[Y \vert E=0]$} & IV & DiD \\

tex & (1) & (2) & (3) & & (4) & (5) & (6) \\
tex \cline{2-4} \cline{6-8}

tex 						& & & & & & & \\
tex $x Number of hospital visits 	& `hosp_a_ivac_q0104_n_m' 		& `hosp_a_ivac_q0104_n_co' 			& `hosp_a_did_q0104_n_co' ///
							& & `hosp_a_ivac_q0508_n_m' 		& `hosp_a_ivac_q0508_n_co' 			& `hosp_a_did_q0508_n_co' \\
tex							& `hosp_a_ivac_q0104_n_mse' 		& `hosp_a_ivac_q0104_n_se' 			& `hosp_a_did_q0104_n_se' ///
							& & `hosp_a_ivac_q0508_n_mse' 		& `hosp_a_ivac_q0508_n_se' 			& `hosp_a_did_q0508_n_se' \\

tex 						& & & & & & & \\
tex $x Number of emergency visits	& `emer_a_ivac_q0104_n_m' 		& `emer_a_ivac_q0104_n_co' 			& `emer_a_did_q0104_n_co' ///
							& & `emer_a_ivac_q0508_n_m' 		& `emer_a_ivac_q0508_n_co' 			& `emer_a_did_q0508_n_co' \\
tex							& `emer_a_ivac_q0104_n_mse' 		& `emer_a_ivac_q0104_n_se' 			& `emer_a_did_q0104_n_se' ///
							& & `emer_a_ivac_q0508_n_mse' 		& `emer_a_ivac_q0508_n_se' 			& `emer_a_did_q0508_n_se' \\

tex 						& & & & & & & \\
tex $x Number of mental health visits 	& `ment_a_ivac_q0104_n_m' 		& `ment_a_ivac_q0104_n_co' 			& `ment_a_did_q0104_n_co' ///
							& & `ment_a_ivac_q0508_n_m' 		& `ment_a_ivac_q0508_n_co' 			& `ment_a_did_q0508_n_co' \\
tex							& `ment_a_ivac_q0104_n_mse' 		& `ment_a_ivac_q0104_n_se' 			& `ment_a_did_q0104_n_se' ///
							& & `ment_a_ivac_q0508_n_mse' 		& `ment_a_ivac_q0508_n_se' 			& `ment_a_did_q0508_n_se' \\
tex $x 				 		& & \multicolumn{1}{r}{[`ment_a_ivac_q0104_n_obs']} & \multicolumn{1}{r}{[`ment_a_did_q0104_n_obs']} & ///
							& & \multicolumn{1}{r}{[`ment_a_ivac_q0508_n_obs']} & \multicolumn{1}{r}{[`ment_a_did_q0508_n_obs']} \\	


tex \bottomrule \\
tex	\end{tabular} }
texdoc close


********************************************************************************
********************************************************************************
**# Table J5 

texdoc init "${Outputs}/Supplementary data_Table_J5.tex", replace force
tex {\footnotesize \begin{tabular}{l c c c c c c c c c c c} \hline \toprule ///
	& \multicolumn{5}{c}{\textbf{1-4 Quarters}} & ///
	& \multicolumn{5}{c}{\textbf{5-8 Quarters}} \\
	
tex \cmidrule{2-6} \cmidrule{8-12}
tex $x & All & Cook & NY & Female & Black & & All & Cook & NY & Female & Black \\ 
tex & (1) & (2) & (3) & (4) & (5) & & (6) & (7) & (8) & (9) & (10) \\
tex \cmidrule{2-6} \cmidrule{8-12}

tex \textbf{\underline{Housing outcomes:}} & \multicolumn{11}{l}{ }	\\
		
tex ~~Not at eviction address: 	& `move_a_did_q0104_b_obs' & `move_a_did_q0104_c_obs' & `move_a_did_q0104_n_obs' & `move_f_did_q0104_b_obs' & `move_b_did_q0104_b_obs' &  ///
								& `move_a_did_q0508_b_obs' & `move_a_did_q0508_c_obs' & `move_a_did_q0508_n_obs' & `move_f_did_q0508_b_obs' & `move_b_did_q0508_b_obs' \\
				
tex \multicolumn{12}{l}{ } \\
tex ~~Emergency shelter: 	& `eshu_a_did_q0104_b_obs' & `eshu_a_did_q0104_c_obs' & `eshu_a_did_q0104_n_obs' & `eshu_f_did_q0104_b_obs' & `eshu_b_did_q0104_b_obs' &  ///
							& `eshu_a_did_q0508_b_obs' & `eshu_a_did_q0508_c_obs' & `eshu_a_did_q0508_n_obs' & `eshu_f_did_q0508_b_obs' & `eshu_b_did_q0508_b_obs' \\
				
tex \multicolumn{12}{l}{ } \\
tex ~~Any homelessness services: 	& `home_a_did_q0104_b_obs' & `home_a_did_q0104_c_obs' & `home_a_did_q0104_n_obs' & `home_f_did_q0104_b_obs' & `home_b_did_q0104_b_obs' & ///
									& `home_a_did_q0508_b_obs' & `home_a_did_q0508_c_obs' & `home_a_did_q0508_n_obs' & `home_f_did_q0508_b_obs' & `home_b_did_q0508_b_obs' \\
								
tex \midrule

tex \textbf{\underline{Labor market outcomes:}} & \multicolumn{11}{l}{ } \\
tex ~~Earnings: 	& `earn_a_did_q0104_b_obs' & `earn_a_did_q0104_c_obs' & `earn_a_did_q0104_n_obs' & `earn_f_did_q0104_b_obs' & `earn_b_did_q0104_b_obs' &  ///
					& `earn_a_did_q0508_b_obs' & `earn_a_did_q0508_c_obs' & `earn_a_did_q0508_n_obs' & `earn_f_did_q0508_b_obs' & `earn_b_did_q0508_b_obs' \\

tex \multicolumn{12}{l}{ } \\
tex ~~Employment: 	& `empl_a_did_q0104_b_obs' & `empl_a_did_q0104_c_obs' & `empl_a_did_q0104_n_obs' & `empl_f_did_q0104_b_obs' & `empl_b_did_q0104_b_obs' & ///
					& `empl_a_did_q0508_b_obs' & `empl_a_did_q0508_c_obs' & `empl_a_did_q0508_n_obs' & `empl_f_did_q0508_b_obs' & `empl_b_did_q0508_b_obs' \\

tex \midrule 

tex \textbf{\underline{Financial health outcomes:}}  & \multicolumn{11}{l}{ } \\
tex ~~Financial health index: 	& `inde_a_did_q0104_b_obs' & `inde_a_did_q0104_c_obs' & `inde_a_did_q0104_n_obs' & `inde_f_did_q0104_b_obs' & `inde_b_did_q0104_b_obs' &  ///
								& `inde_a_did_q0508_b_obs' & `inde_a_did_q0508_c_obs' & `inde_a_did_q0508_n_obs' & `inde_f_did_q0508_b_obs' & `inde_b_did_q0508_b_obs' \\
				
tex \multicolumn{12}{l}{ } \\
tex ~~Credit score: 	& `cred_a_did_q0104_b_obs' & `cred_a_did_q0104_c_obs' & `cred_a_did_q0104_n_obs' & `cred_f_did_q0104_b_obs' & `cred_b_did_q0104_b_obs' &  ///
						& `cred_a_did_q0508_b_obs' & `cred_a_did_q0508_c_obs' & `cred_a_did_q0508_n_obs' & `cred_f_did_q0508_b_obs' & `cred_b_did_q0508_b_obs' \\
				
tex \multicolumn{12}{l}{ } \\
tex ~~No open revolving account: 	& `zero_a_did_q0104_b_obs' & `zero_a_did_q0104_c_obs' & `zero_a_did_q0104_n_obs' & `zero_f_did_q0104_b_obs' & `zero_b_did_q0104_b_obs' &  ///
									& `zero_a_did_q0508_b_obs' & `zero_a_did_q0508_c_obs' & `zero_a_did_q0508_n_obs' & `zero_f_did_q0508_b_obs' & `zero_b_did_q0508_b_obs' \\
				
tex \multicolumn{12}{l}{ } \\
tex ~~Total balance: collections and 	& `deli_a_did_q0104_b_obs' & `deli_a_did_q0104_c_obs' & `deli_a_did_q0104_n_obs' & `deli_f_did_q0104_b_obs' & `deli_b_did_q0104_b_obs' &  ///
									& `deli_a_did_q0508_b_obs' & `deli_a_did_q0508_c_obs' & `deli_a_did_q0508_n_obs' & `deli_f_did_q0508_b_obs' & `deli_b_did_q0508_b_obs' \\
				
tex \multicolumn{12}{l}{~~delinquencies: } \\
tex ~~Any auto loan or lease: 	& `auto_a_did_q0104_b_obs' & `auto_a_did_q0104_c_obs' & `auto_a_did_q0104_n_obs' & `auto_f_did_q0104_b_obs' & `auto_b_did_q0104_b_obs' &  ///
								& `auto_a_did_q0508_b_obs' & `auto_a_did_q0508_c_obs' & `auto_a_did_q0508_n_obs' & `auto_f_did_q0508_b_obs' & `auto_b_did_q0508_b_obs' \\
							
tex \bottomrule \\
tex	\end{tabular} }
texdoc close

